package org.mte.sak.reflect;

import java.util.ArrayList;

/**
 * MethodDescriptor: descrive un metodo di un classe
 *
 * @author Marco Traversari
 * @version $Revision: 1.1 $ $Date: 2011-04-18 08:37:54 $ $Author: marco $
 */
public class MethodDescriptor {

	/**
	 * name
	 */
	private String name = null;

	/**
	 * args
	 */
	private ArrayList<ArgDescriptor> argDescriptors = null;

	/**
	 * MethodDescriptor
	 * @param name
	 */
	public MethodDescriptor(String name) {
		this.name = name;
	}

	/**
	 * addArgDescriptor
	 * @param argDescriptor
	 */
	public void addArgDescriptor(ArgDescriptor argDescriptor) {
		if (argDescriptors == null) {
			argDescriptors = new ArrayList<ArgDescriptor>();
		}
		argDescriptors.add(argDescriptor);
	}

	/**
	 * getName
	 * @return name
	 */
	public String getName() {
		return name;
	}

	/**
	 * setName
	 * @param name
	 */
	public void setName(String name) {
		this.name = name;
	}

	/**
	 * getArgDescriptors
	 * @return argDescriptors
	 */
	public ArrayList<ArgDescriptor> getArgDescriptors() {
		return argDescriptors;
	}

	/**
	 * setArgDescriptors
	 * @param argDescriptors
	 */
	public void setArgDescriptors(ArrayList<ArgDescriptor> argDescriptors) {
		this.argDescriptors = argDescriptors;
	}
}
